-
Notifications
You must be signed in to change notification settings - Fork 28
fix misleading error message #239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes adjust logging verbosity for reporting the maximum block number in storage, switching from Info to Debug level. Additionally, the logic for determining the number of blocks to commit is refined: negative block counts now trigger errors, while zero block counts are handled gracefully by returning an empty slice without error. Changes
Estimated code review effort1 (~3 minutes) 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (2)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|

TL;DR
Improved committer logic for handling edge cases when determining blocks to commit.
What changed?
InfotoDebugfor the message about the max block number found in main storageHow to test?
Why make this change?
The previous implementation treated zero blocks to commit as an error condition, which isn't actually an error state but a valid scenario where the system is already up to date. This change improves the robustness of the committer by properly distinguishing between error conditions (negative block count) and valid no-op conditions (zero block count).
Summary by CodeRabbit